package com.contest.util;

import com.contest.constant.CommonsConstant;
import com.contest.entity.UserInfo;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;

public class UserLoginUtil {



    public static UserInfo getCurrentUserInfo(HttpServletRequest request){
        /*UserInfo userInfo = new UserInfo();
        userInfo.setFdId("1");
        userInfo.setFdType(0);
        userInfo.setFdNickname("测试账号");
        userInfo.setFdAvatarUrl("http://img.zcool.cn/community/013e6f55cb02d46ac7255808dac6ca.jpg@2o.jpg");
        userInfo.setFdSex(0);
        userInfo.setFdGrade("9");
        userInfo.setFdMerchantName("测试");
        userInfo.setFdMerchant("0");
        userInfo.setFdEmail("1213@qq.com");
        userInfo.setFdMobile("4353632332");
        userInfo.setFdStatus(1);
        userInfo.setFdOver(new BigDecimal(8888));
        userInfo.setFdBettingTotal(new BigDecimal(0));
        userInfo.setFdRechargeTotal(new BigDecimal(1000));
        userInfo.setFdRecommendCode("dsafnashoi");
        userInfo.setFdMyCode("asdfas");
        userInfo.setFdRoleName("普通用户");
        userInfo.setFdRoleId("2");*/
        UserInfo userInfo = (UserInfo) request.getSession().getAttribute(CommonsConstant.CLIENT_LOGIN_SESSION);
        return userInfo;
    }

}
